package month4.day6;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Menu {
    public static void main(String[] args) {
        while (true) {
            try {
                System.out.println("1：登录，2：注册，3：联系客服");
                Scanner in = new Scanner(System.in);
                int a = in.nextInt();
                if (a == 1) {
                    System.out.println("登录");
                } else if (a == 2) {
                    System.out.println("登录");
                } else if (a == 3) {
                    System.out.println("登录");
                }
                if (a < 1 || a > 3)
                    throw new Exception("序号必须在1~3之间");
            }  catch (Exception e) {
                System.out.println("输入错误,重新输入");
                e.printStackTrace();
            }
        }
    }
}
